﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataAccessLayer;
using System.Data;
using System.Data.OleDb;
using InfoLayer;

namespace ControlLayer
{
    public class PhieuThuePhongControl
    {
        private PhieuThuePhongDataAccess PhieuThuePhongDA = new PhieuThuePhongDataAccess();

        public DataTable LayBangDanhSachPhong()
        {
            return PhieuThuePhongDA.LayBangDanhSachPhieuThuePhong();
        }

        public void Insert(ref PhieuThuePhongInfo phieuThuePhongInfo)
        {
            PhieuThuePhongDA.Insert(ref phieuThuePhongInfo);
        }

        public void Update(PhieuThuePhongInfo phieuThuePhongInfo)
        {
            PhieuThuePhongDA.Update(phieuThuePhongInfo);
        }

        public void Delete(PhieuThuePhongInfo phieuThuePhongInfo)
        {
            PhieuThuePhongDA.Delete(phieuThuePhongInfo);
        }

        public string TaoMaTuDong(string maGoc, int batDau)
        {
            return PhieuThuePhongDA.TaoMaTuDong(maGoc, batDau);
        }

        public DataTable LayDonGia(String _MaPhong)
        {
            return PhieuThuePhongDA.LayDonGia(_MaPhong);
        }

        public DataTable LayGiaTri(String _MaPhong)
        {
            return PhieuThuePhongDA.LayGiaTri(_MaPhong);
        }

        public DataTable LayDSPhieu_ChuaTT(String _MaPhong)
        {
            return PhieuThuePhongDA.LayDSPhieu_ChuaTT(_MaPhong);
        }
        
        public void Update_DaTT(PhieuThuePhongInfo phieuThuePhongInfo)
        {
            PhieuThuePhongDA.Update_DaTT(phieuThuePhongInfo);
        }

        public DataTable LaySoLuongKhach(String _MaPhieuThue)
        {
            return PhieuThuePhongDA.LaySoLuongKhach(_MaPhieuThue);
        }

        public DataTable LayLoaiKhach(String _MaPhieuThue)
        {
            return PhieuThuePhongDA.LayLoaiKhach(_MaPhieuThue);
        }

        public DataTable LayBangDanhSachThanhTien()
        {
            return PhieuThuePhongDA.LayBangDanhSachThanhTien();
        }

        public DataTable Timkiemphong(String tungay, String denngay)
        {
            return PhieuThuePhongDA.Timkiemphong(tungay, denngay);
        }

        public DataTable TimKiemTriGia(int donGiaTu, int donGiaDen)
        {
            return PhieuThuePhongDA.TimKiemTriGia(donGiaTu, donGiaDen);
        }


    }
}
